package day2;
class Out1{
    public int a1=1;
    public static int a2=2;
    public void fun1(){
        //Inter inter=new Inter();
        //Inter.fun3();
    }
    public  void fun2(){
        System.out.println();
    }

    public static class Inter{
        public int b1=3;
        public final static int b2=4;
        public void fun3(){
            System.out.println(new Out().a1);
            System.out.println(Out.a2);

            System.out.println(b1);
            System.out.println(b2);
        }
        //实例内部类中不能定义静态方法
//        public  static void fun4(){
//
//        }
    }
}
public class RealClass {
    public static void main(String[] args) {
        Out1 out1=new Out1();
        //创建实例内部类对象
        //Out1.Inter inter=out1.new Inter();
        //通过实例内部类访问外部类
        //inter.fun3();
        out1.fun1();
    }
}
